<?php
+use MediaWiki\MediaWikiServices;
use Wikimedia\TestingAccessWrapper;
/**
);
}
+ public function testRcNsFilterAssociatedSpecial() {
+ $this->assertConditions(
+ [ # expected
+ "rc_namespace IN ('-1','0','1')",
+ ],
+ [
+ 'namespace' => '1;-1',
+ 'associated' => 1,
+ ],
+ "rc conditions with associated and special namespace"
+ );
+ }
+
public function testRcNsFilterMultipleAssociatedInvert() {
$this->assertConditions(
[ # expected
);
}
+ public function testRcNsFilterAllContents() {
+ $namespaces = MediaWikiServices::getInstance()->getNamespaceInfo()->getSubjectNamespaces();
+ $this->assertConditions(
+ [ # expected
+ 'rc_namespace IN (' . $this->db->makeList( $namespaces ) . ')',
+ ],
+ [
+ 'namespace' => 'all-contents',
+ ],
+ "rc conditions with all-contents"
+ );
+ }
+
public function testRcHidemyselfFilter() {
$this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
$this->overrideMwServices();
$user
);
}
+
public function testRcHidepatrolledFilter() {
$user = $this->getTestSysop()->getUser();
$this->assertConditions(